﻿<%@ Page Language="C#" MasterPageFile="~/Master.master" AutoEventWireup="true" CodeFile="pesquisar.aspx.cs"
    Inherits="pesquisar" EnableEventValidation="false" %>

<asp:Content ContentPlaceHolderID="head" runat="server">
    <script src="http://maps.google.com/maps?file=api&amp;v=2&amp;sensor=false&amp;key=AIzaSyAKKcewNixA_I9bWskupUQjR3-8-IIgHgU"
        type="text/javascript"></script>
    <script src="js/jquery.gmap-1.1.0-min.js" type="text/javascript"></script>
</asp:Content>
<asp:Content ContentPlaceHolderID="contentMain" runat="server">
    <div class="interno">
        <asp:Panel ID="Panel1" runat="server" DefaultButton="btnBuscar2">
            
            <div id="searchBox">
                <h1>
                Pesquisar
            </h1>
                <center>
                    <table style="text-align: left;">
                        <tr>
                            <td colspan="1">
                            </td>
                            <td colspan="3">
                                <asp:TextBox ID="txtBusca" CssClass="larg_inpt3" runat="server" Width="398px"></asp:TextBox>
                            </td>
                            <td rowspan="4">
                                <asp:CheckBoxList ID="ckbEquipamentos" runat="server" RepeatDirection="Vertical">
                                </asp:CheckBoxList>
                            </td>
                        </tr>
                        <tr>
                            <td colspan="4">
                                <asp:Button ID="btnBuscar2" Style="float: right;" CssClass="button" Text="Buscar"
                                    runat="server" OnClick="btnBuscar_Click" />
                                <br />
                                <asp:Label ID="lblMensagem" runat="server"></asp:Label>
                            </td>
                        </tr>
                    </table>
                </center>
            </div>
            <br />
            <br />
            <div style="width: 85%;min-height: 370px;margin: auto;">
                <div class="side_menu">
                <h3>Categorias</h3>
                    <ul>
                        <li><a href="pesquisar.aspx?tipoe=0">Agência</a></li>
                        <li><a href="pesquisar.aspx?tipoe=1">Compras</a></li>
                        <li><a href="pesquisar.aspx?tipoe=2">Cultura e Lazer</a></li>
                        <li><a href="pesquisar.aspx?tipoe=3">Gastronomia</a></li>
                        <li><a href="pesquisar.aspx?tipoe=4">Hospedagem</a></li>
                        <li><a href="pesquisar.aspx?tipoe=5">Noturno</a></li>
                        <li><a href="pesquisar.aspx?tipoe=6">Religião</a></li>
                        <li><a href="pesquisar.aspx?tipoe=7">Saúde</a></li>
                        <li><a href="pesquisar.aspx?tipoe=8">Serviços</a></li>
                        <li><a href="pesquisar.aspx?tipoe=9">Transportes</a></li>
                        <li><a href="pesquisar.aspx?tipoe=10">Utilidade Pública</a></li>
                    </ul>
                </div>
                <asp:GridView ID="gdvEquipamento" runat="server" AutoGenerateColumns="False" DataKeyNames="id"
                    BorderWidth="0px" BorderColor="White" BorderStyle="None" OnSelectedIndexChanged="gdvEquipamento_SelectedIndexChanged"
                    OnRowDataBound="gdvEquipamento_RowDataBound" ShowHeader="False" CssClass="gridEquips"
                    Width="631px" OnPreRender="gdvEquipamento_PreRender" AllowPaging="true" 
                    onpageindexchanging="gdvEquipamento_PageIndexChanging" PageSize="10" PagerStyle-CssClass="gridEquipsPager">
                    <Columns>
                        <asp:TemplateField HeaderText="Nome">
                            <ItemTemplate>
                                <div style="text-align: center; vertical-align: middle; float: left; padding: 5px;">
                                    <asp:HyperLink runat="server" ID="lnkImgDetalhar">
                                        <asp:Image ID="imgThumbnailumbnail" runat="server" class="resultados_thumbnail"  AlternateText="Imagem Indisponível" /></asp:HyperLink>
                                </div>
                                <div class="resultado_detalhes">
                                    <asp:Label CssClass="gridDetalhes" runat="server" ID="lblNome" Text='<%# Bind("nome") %>'
                                        Font-Bold="True"></asp:Label>
                                    <br />
                                    <br />
                                    <asp:Label ID="lblEndereço" Text='<%# Bind("endereco") %>' runat="server"></asp:Label>&nbsp;
                                    <asp:HyperLink CssClass="linkMapa" ID="lnkMapa" runat="server" Text="[mapa]"></asp:HyperLink>
                                    <div id="map_canvas" style="width: 400px; height: 300px; display: none; border: 3px solid black;
                                        padding: 2px; position: absolute; background-color: white;" runat="server">
                                    </div>
                                    <span class="gridDetalhes"><b>Tel</b>:</span>
                                    <asp:Label ID="lblTel" Text='<%# Bind("telefone") %>' runat="server"></asp:Label>
                                    <br />
                                    <span class="gridDetalhes"><b>email</b>:</span>
                                    <asp:Label CssClass="gridDetalhes" ID="lblEmail" Text='<%# Bind("email") %>' runat="server"></asp:Label>
                                </div>
                            </ItemTemplate>
                        </asp:TemplateField>
                        <asp:TemplateField HeaderText="">
                            <ItemTemplate>
                                <div style="vertical-align: top; height: 101px;">
                                    <div id="div_lnkEditar" runat="server">
                                        <asp:HyperLink ID="lnkEditar" runat="server" Text="° [Editar este equipamento]" Style="color: Gray;
                                            text-decoration: none; white-space: nowrap;"></asp:HyperLink></div>
                                    <asp:LinkButton CommandName="Select" ID="lnkDetalhar" runat="server" Text="° [Veja mais detalhes]"
                                        Style="color: Gray; text-decoration: none;"></asp:LinkButton>
                                </div>
                            </ItemTemplate>
                        </asp:TemplateField>
                        
                    </Columns>
                </asp:GridView>
            </div>
        </asp:Panel>
    </div>
</asp:Content>
